package interface1;

public class WearableRobot implements Color,Wearable{
    private int color;
    public WearableRobot(int color ){
                    changeColor(color);
    }

    public String toString(){
        switch (color){
            case RED:return "红色机器人";
            case GREEN:return "绿色机器人";
            case BLUE:return "蓝色机器人";
            case YELLOW:return "黄色机器人";
        }
        return "1234";
    }
    @Override
    public void changeColor(int color) {
        this.color=color;
    }

    @Override
    public void putOn() {
        System.out.println(toString()+" 戴上");
    }

    @Override
    public void putOff() {
        System.out.println(toString()+" 摘下");
    }
}
